package com.wica.adapter;

import com.wica.view.ELSuggestions;

import android.content.Context;
import android.preference.PreferenceManager;

public class ELASuggestions extends EfficientListAdapter{
	// *************** Constants ************** //  
    public static final String TAB_PREFERENCES_SEARCH_1 = "suggestions_time";
    public static final String TAB_PREFERENCES_SEARCH_2= "suggestions_numberOfResults";
    public static final int GUIUPDATEIDENTIFIER = 12345;

    // *************** Attributes ************************* //
	/* Attributes: (regarding FaceTube WebService) */
    /** numberOfResults: 	Integer -- 0..30 	(regarding FaceTube WebService)	**/
	private Integer numberOfResults;
	/** userID: 			Integer 			(regarding FaceTube WebService) **/
	protected Integer userID;
	
	public ELASuggestions(ELSuggestions list) {
		super(list);		
		adapter=this;
		this.list=list;
		this.numberOfResults=Integer.valueOf(PreferenceManager.getDefaultSharedPreferences((Context)list).getString("suggestions_numberOfResults", "30"));
		this.userID=Integer.valueOf(PreferenceManager.getDefaultSharedPreferences((Context)list).getInt("userID", -1));		
		getListOfVideosThread();		
	}//EfficientListAdapterMostViewed method	

    protected void getListOfVideosMethod() {
    	super.getListOfVideosMethod();
		listOfMovies = fts.getPersonalizedClips(numberOfResults, userID);
	}// getListOfVideosMethod method
	
    // *************** Set methods ************** //  
	public void setNumberOfResults(Integer numberOfResults){
    	this.numberOfResults = numberOfResults;
    }//setNumberOfResults method	
    
    public void setUserID(Integer userID){
    	this.userID = userID;
    }//setTime method
    
}// ELASuggestions class